package com.east.sng.entity.param;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author east
 * @date: 2021/1/3
 * @Description: Charge receive param javabean
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ChargeParam {

    @NotNull(message = "{param.id.notnull}")
    private Integer chargeId;
    @NotBlank(message = "{chargeparam.payername.notblank}")
    private String payerName;
    @NotBlank(message = "{chargeparam.payerphone.notblank}")
    @Pattern(regexp = "^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\\d{8}$",message = "{chargeparam.payerphone.pattern}")
    private String payerPhone;
    @NotNull(message = "{chargeparam.paymentamount.notnull}")
    private Double paymentAmount;
    @NotBlank(message = "{chargeparam.stuname.notblank}")
    @Pattern(regexp = "^([1-9][0-9]*){1,2}$",message = "{chargeparam.stuname.notblank}")
    private String stuName;

}